/* ======================================================
   NOTEBOOK - MODERN GRADIENT STYLE
   ====================================================== */
.note-card-content {
  max-width: 100%;
  margin: 0 auto;
  padding: 35px;
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.note-card-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue), var(--accent-purple));
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.note-card-content h1 {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.note-intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 25px;
  font-weight: 400;
}

.note-controls-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 25px 0;
  padding: 20px;
  background: var(--overlay-medium);
  border-radius: 12px;
  border: 1px solid rgba(45, 55, 72, 0.5);
}

/* Buttons */
.note-btn-wissen,
.note-btn-copy,
.note-btn-download {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
}

.note-btn-wissen::before,
.note-btn-copy::before,
.note-btn-download::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.note-btn-wissen:hover::before,
.note-btn-copy:hover::before,
.note-btn-download:hover::before {
  width: 300px;
  height: 300px;
}

.note-btn-wissen {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.note-btn-wissen:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.note-btn-copy {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
}

.note-btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.6);
}

.note-btn-download {
  background: linear-gradient(135deg, var(--button-primary-bg) 0%, var(--button-primary-hover) 100%);
  box-shadow: 0 4px 15px rgba(35, 134, 54, 0.4);
}

.note-btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(35, 134, 54, 0.6);
}

.note-btn-wissen:active,
.note-btn-copy:active,
.note-btn-download:active {
  transform: translateY(0);
}

/* Dropdowns en controls */
.font-dropdown-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.font-dropdown-wrap label {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.font-dropdown-wrap select {
  padding: 8px 12px;
  background: var(--overlay-dark);
  border: 2px solid var(--border-dark);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9rem;
  width: 140px;
  font-family: "Roboto Mono", monospace;
  cursor: pointer;
  transition: all 0.2s ease;
}

.font-dropdown-wrap select:hover {
  border-color: var(--accent-purple);
}

.font-dropdown-wrap select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

.color-picker {
  width: 60px;
  height: 38px;
  border: 2px solid var(--border-dark);
  border-radius: 8px;
  background: var(--overlay-dark);
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
}

.color-picker:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.3);
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  background: var(--overlay-dark);
  border-radius: 8px;
  border: 2px solid var(--border-dark);
  transition: all 0.2s ease;
}

.checkbox-label:hover {
  border-color: var(--accent-purple);
  background: var(--overlay-light);
}

.checkbox-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent-purple);
}

.font-separator {
  margin: 0 8px;
  color: var(--border-dark);
  font-weight: bold;
  font-size: 1.2rem;
  opacity: 0.5;
}

/* Formatting buttons */
.note-format-controls {
  display: flex;
  gap: 6px;
}

.format-btn {
  padding: 8px 12px;
  border: 2px solid var(--border-dark);
  border-radius: 8px;
  background: var(--overlay-dark);
  color: var(--text-color);
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  min-width: 38px;
  white-space: nowrap;
}

.format-btn:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: white;
  transform: translateY(-2px);
}

.format-btn.active {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
  border-color: var(--accent-purple);
  color: white;
  box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
}

/* Text area */
.note-area-contenteditable {
  width: 100%;
  min-height: 400px;
  border: 2px solid var(--border-dark);
  border-radius: 12px;
  resize: vertical;
  background: var(--overlay-dark);
  color: #ffffff;
  font-family: "Roboto Mono", monospace;
  font-size: 1rem;
  padding: 20px;
  line-height: 1.6rem;
  outline: none;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-y: auto;
  position: relative;
  padding-left: 3em;
  overflow: auto;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.note-area-contenteditable:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.2);
}

.note-area-contenteditable:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

/* Line numbers */
.custom-line-numbers {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2.5em;
  text-align: right;
  padding: 0.5em 0.4em 0 0;
  line-height: 1.6;
  color: var(--accent-purple);
  font-family: inherit;
  font-size: inherit;
  white-space: pre;
  user-select: none;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
  z-index: 2;
  opacity: 0.6;
}

.note-area-contenteditable.line-numbers-enabled {
  padding-left: 60px;
  position: relative;
  background: var(--overlay-dark);
  counter-reset: line;
}

.note-area-contenteditable.line-numbers-enabled::before {
  content: '';
  position: absolute;
  left: 50px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-purple), transparent);
  opacity: 0.3;
  pointer-events: none;
  z-index: 1;
}

/* Line numbers worden nu dynamisch gegenereerd via JavaScript */

/* Placeholder */
.note-area-contenteditable[contenteditable="true"]:empty::before {
  content: attr(placeholder);
  color: #6c757d;
  pointer-events: none;
  position: relative;
  left: 0;
  display: inline;
  white-space: nowrap;
  font-style: italic;
  opacity: 0.5;
}

.note-area-contenteditable.line-numbers-enabled[contenteditable="true"]:empty::before {
  left: 0;
  margin-left: 45px;
  display: inline;
  white-space: nowrap;
}

/* Headings */
.note-area-contenteditable h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  padding: 0;
  line-height: 1.6rem;
  color: var(--accent-purple);
  display: block;
}

.note-area-contenteditable h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
  line-height: 1.6rem;
  color: var(--accent-blue);
  display: block;
}

.note-area-contenteditable h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
  line-height: 1.6rem;
  color: var(--strength-good);
  display: block;
}

/* Stats section */
.note-editor {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-timestamp {
  background: var(--overlay-dark);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-dark);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

.note-counter {
  background: var(--overlay-dark);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: "Roboto Mono", monospace;
}

.note-counter span {
  color: var(--accent-blue);
  font-weight: 700;
}

/* Feedback */
.note-feedback {
  background: linear-gradient(135deg, var(--strength-strong) 0%, #059669 100%);
  color: white;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.note-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Confirmation Modal */
.note-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.note-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.note-modal {
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--secondary-bg) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 30px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  position: relative;
}

.note-modal-overlay.visible .note-modal {
  transform: scale(1) translateY(0);
}

.note-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #dc2626, #ef4444);
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
  border-radius: 16px 16px 0 0;
}

.note-modal-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
}

.note-modal h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
}

.note-modal p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}

.note-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.note-modal-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.note-modal-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.note-modal-btn:hover::before {
  width: 300px;
  height: 300px;
}

.note-modal-btn-cancel {
  background: var(--overlay-medium);
  color: var(--text-primary);
  border: 2px solid var(--border-dark);
}

.note-modal-btn-cancel:hover {
  background: var(--overlay-light);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

.note-modal-btn-confirm {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.note-modal-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.note-modal-btn-confirm:active,
.note-modal-btn-cancel:active {
  transform: translateY(0);
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
  .note-modal {
    padding: 24px;
    max-width: 90%;
  }
  
  .note-modal h3 {
    font-size: 1.2rem;
  }
  
  .note-modal p {
    font-size: 0.9rem;
  }
  
  .note-modal-actions {
    grid-template-columns: 1fr;
  }

  .note-card-content {
    padding: 20px 12px;
    border-radius: 16px;
  }
  
  .note-card-content h1 {
    font-size: 1.5rem;
  }
  
  .note-intro {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .note-controls-row {
    flex-direction: column;
    padding: 16px;
    gap: 10px;
  }
  
  .font-dropdown-wrap {
    width: 100%;
  }
  
  .font-dropdown-wrap select {
    width: 100%;
  }
  
  .note-format-controls {
    width: 100%;
    justify-content: center;
  }
  
  .note-area-contenteditable {
    min-height: 300px;
    padding: 16px;
    font-size: 0.95rem;
  }
  
  .note-btn-wissen,
  .note-btn-copy,
  .note-btn-download {
    width: 100%;
    justify-content: center;
  }
  
  .checkbox-label {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .note-card-content {
    padding: 16px 10px;
  }
  
  .note-card-content h1 {
    font-size: 1.3rem;
  }
  
  .note-intro {
    font-size: 0.8rem;
  }
  
  .note-area-contenteditable {
    font-size: 0.9rem;
    min-height: 250px;
  }
  
  .note-counter {
    flex-direction: column;
    gap: 8px;
  }
}